﻿using System.Collections.Generic;
using System.Web.Http;
using System.Web.Http.Description;

namespace IceDog.DNF.Program.WebApi2.Controllers
{
    public class ValueController : ApiController
    {
        /// <summary>
        /// GET: api/Value
        /// </summary>
        /// <returns></returns>
        public IEnumerable<string> Get()
        {
            return new string[] { "value1", "value2" };
        }

        /// <summary>
        /// GET: api/Value/5
        /// </summary>
        /// <param name="id">id号</param>
        /// <returns></returns>
        public string Get(int id)
        {
            return "value";
        }
        /// <summary>
        /// POST: api/Value
        /// </summary>
        /// <param name="value"></param>
        public void Post([FromBody]string value)
        {
        }

        /// <summary>
        /// PUT: api/Value/5
        /// </summary>
        /// <param name="id"></param>
        /// <param name="value"></param>
        public void Put(int id, [FromBody]string value)
        {
        }

        /// <summary>
        /// DELETE: api/Value/5 this api is hidden
        /// </summary>
        /// <param name="id"></param>
        [ApiExplorerSettings(IgnoreApi = true)]
        public void Delete(int id)
        {

        }
    }
}
